<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <button id='log'>登录</button>
</body>

</html>
<script>
  log.onclick = function () {
    fetch('http://localhost:3000/login', {
      method: 'POST',
      body: JSON.stringify({
        name: 'zf',
        psw: 1233123
      })
    })
  }
</script>